package com.ssy.lingxi.settle.accounts.model.vo.request;

import com.ssy.lingxi.settle.accounts.handler.annotation.DateStringFormatAnnotation;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.List;

/**
 * 修改请款单VO
 * @author Saske
 * @date 2021/12/20
 * @version 2.0.0
 */
public class ApplyAmountUpdateVO implements Serializable {
    private static final long serialVersionUID = -1263782137780959178L;

    /**
     * 请款单id
     */
    @NotNull(message = "请款单id要大于0")
    @Positive(message = "请款单id要大于0")
    private Long id;

    /**
     * （供应商）会员Id
     */
    @NotNull(message = "供应商会员Id要大于0")
    @Positive(message = "供应商会员Id要大于0")
    private Long vendorMemberId;

    /**
     * （供应商）会员角色Id
     */
    @NotNull(message = "供应商会员角色Id要大于0")
    @Positive(message = "供应商会员角色Id要大于0")
    private Long vendorRoleId;

    /**
     * （采购方）会员Id
     */
    @NotNull(message = "采购方会员Id要大于0")
    @Positive(message = "采购方会员Id要大于0")
    private Long buyerMemberId;

    /**
     * （采购方）会员角色Id
     */
    @NotNull(message = "采购方会员角色Id要大于0")
    @Positive(message = "采购方会员角色Id要大于0")
    private Long buyerRoleId;

    /**
     * 请款摘要
     */
    @NotBlank(message = "请款摘要不能为空")
    @Size(max = 60,message = "最长60个字符，30个汉字")
    private String applyAbstract;

    /**
     * 收款方
     */
    @NotBlank(message = "收款方不能为空")
    private String payee;

    /**
     * 付款方
     */
    @NotBlank(message = "付款方不能为空")
    private String payer;

    /**
     * 账号名称
     */
    @NotBlank(message = "账号名称不能为空")
    private String accountName;

    /**
     * 银行账号
     */
    @NotBlank(message = "银行账号不能为空")
    private String bankAccount;

    /**
     * 开户行
     */
    @NotBlank(message = "开户行不能为空")
    private String bankDeposit;

    /**
     * 预计付款日期 日期格式必须为yyyy-MM-dd
     */
    @NotBlank(message = "预计付款日期不能为空")
    @DateStringFormatAnnotation(message = "预计付款日期日期格式不对")
    private String expectPayTime;

    /**
     * 付款方式：定义在PayDateWayEnum中
     */
    @NotNull(message = "付款方式不能为空")
    private Integer payWay;

    /**
     * 付款方式参数-月：付款方式为账期-月，显示月数
     */
    private Integer payMonth;

    /**
     * 付款方式参数-日：付款方式为账期-月或者账期-天，显示日期或天数
     */
    private Integer payDate;

    /**
     * 支付方式,定义在MoneyPayWayEnum中
     */
    @NotNull(message = "支付方式不能为空")
    private Integer moneyPayWay;

    /**
     * 请款备注
     */
    @NotBlank(message = "请款备注不能为空")
    @Size(max = 160,message = "请款备注最长80个汉字")
    private String remark;

    /**
     * 对应对账单ID
     */
    private Long reconciliationId;

    /**
     * 对应对账单号
     */
    private String reconciliationNo;

    /**
     * 对账单行明细信息
     */
    @Valid
    @NotEmpty(message = "至少需要选择一条请款单明细数据")
    private List<ApplyAmountRowSaveVO> rows;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getVendorMemberId() {
        return vendorMemberId;
    }

    public void setVendorMemberId(Long vendorMemberId) {
        this.vendorMemberId = vendorMemberId;
    }

    public Long getVendorRoleId() {
        return vendorRoleId;
    }

    public void setVendorRoleId(Long vendorRoleId) {
        this.vendorRoleId = vendorRoleId;
    }

    public Long getBuyerMemberId() {
        return buyerMemberId;
    }

    public void setBuyerMemberId(Long buyerMemberId) {
        this.buyerMemberId = buyerMemberId;
    }

    public Long getBuyerRoleId() {
        return buyerRoleId;
    }

    public void setBuyerRoleId(Long buyerRoleId) {
        this.buyerRoleId = buyerRoleId;
    }

    public String getApplyAbstract() {
        return applyAbstract;
    }

    public void setApplyAbstract(String applyAbstract) {
        this.applyAbstract = applyAbstract;
    }

    public String getPayee() {
        return payee;
    }

    public void setPayee(String payee) {
        this.payee = payee;
    }

    public String getPayer() {
        return payer;
    }

    public void setPayer(String payer) {
        this.payer = payer;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getBankAccount() {
        return bankAccount;
    }

    public void setBankAccount(String bankAccount) {
        this.bankAccount = bankAccount;
    }

    public String getBankDeposit() {
        return bankDeposit;
    }

    public void setBankDeposit(String bankDeposit) {
        this.bankDeposit = bankDeposit;
    }

    public String getExpectPayTime() {
        return expectPayTime;
    }

    public void setExpectPayTime(String expectPayTime) {
        this.expectPayTime = expectPayTime;
    }

    public Integer getPayWay() {
        return payWay;
    }

    public void setPayWay(Integer payWay) {
        this.payWay = payWay;
    }

    public Integer getPayMonth() {
        return payMonth;
    }

    public void setPayMonth(Integer payMonth) {
        this.payMonth = payMonth;
    }

    public Integer getPayDate() {
        return payDate;
    }

    public void setPayDate(Integer payDate) {
        this.payDate = payDate;
    }

    public Integer getMoneyPayWay() {
        return moneyPayWay;
    }

    public void setMoneyPayWay(Integer moneyPayWay) {
        this.moneyPayWay = moneyPayWay;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getReconciliationId() {
        return reconciliationId;
    }

    public void setReconciliationId(Long reconciliationId) {
        this.reconciliationId = reconciliationId;
    }

    public String getReconciliationNo() {
        return reconciliationNo;
    }

    public void setReconciliationNo(String reconciliationNo) {
        this.reconciliationNo = reconciliationNo;
    }

    public List<ApplyAmountRowSaveVO> getRows() {
        return rows;
    }

    public void setRows(List<ApplyAmountRowSaveVO> rows) {
        this.rows = rows;
    }
}
